#!/bin/csh
#To change the name of files corresponding to a tao/tao3D project.

echo Sintax: $0 old_name new_name
echo newname must be in the same directory!

unalias ls
set filelist = `ls $1.[0-Z]*  $1?.UNIT $1??.UNIT $1?.CRG $1??.CRG$1?.LOAD $1??.LOAD`

foreach file ($filelist)
	set newfile = `echo $file | sed "s/$1/$2/g1"`
	cp $file $newfile
end
